package com.zyd.mappers;

import com.zyd.io.model.UserEntity;
import com.zyd.io.model.UserEntityExample;
import com.zyd.io.model.UserEntityKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface UserEntityMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @SelectProvider(type=UserEntitySqlProvider.class, method="countByExample")
    long countByExample(UserEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @DeleteProvider(type=UserEntitySqlProvider.class, method="deleteByExample")
    int deleteByExample(UserEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @Delete({
        "delete from zydzn_users",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(UserEntityKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @Insert({
        "insert into zydzn_users (id, nickname, ",
        "city, headimgurl, ",
        "unionid, ts, last_login_time, ",
        "phone_login, login, ",
        "reg_time, username, ",
        "pwd, usertype, dr, ",
        "sex, mobile, telephone, ",
        "email, birthday, ",
        "openid, country, ",
        "nation, userstate, ",
        "userclass, accountmny, ",
        "createuser, safepwd, ",
        "address, areaid, ",
        "company, department, ",
        "job_title, area, ",
        "rolename, card_id, ",
        "company_id)",
        "values (#{id,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, ",
        "#{city,jdbcType=VARCHAR}, #{headimgurl,jdbcType=VARCHAR}, ",
        "#{unionid,jdbcType=VARCHAR}, #{ts,jdbcType=VARCHAR}, #{last_login_time,jdbcType=VARCHAR}, ",
        "#{phone_login,jdbcType=INTEGER}, #{login,jdbcType=INTEGER}, ",
        "#{reg_time,jdbcType=CHAR}, #{username,jdbcType=VARCHAR}, ",
        "#{pwd,jdbcType=VARCHAR}, #{usertype,jdbcType=VARCHAR}, #{dr,jdbcType=INTEGER}, ",
        "#{sex,jdbcType=INTEGER}, #{mobile,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, ",
        "#{email,jdbcType=VARCHAR}, #{birthday,jdbcType=VARCHAR}, ",
        "#{openid,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR}, ",
        "#{nation,jdbcType=VARCHAR}, #{userstate,jdbcType=INTEGER}, ",
        "#{userclass,jdbcType=INTEGER}, #{accountmny,jdbcType=DECIMAL}, ",
        "#{createuser,jdbcType=VARCHAR}, #{safepwd,jdbcType=VARCHAR}, ",
        "#{address,jdbcType=VARCHAR}, #{areaid,jdbcType=VARCHAR}, ",
        "#{company,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, ",
        "#{job_title,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, ",
        "#{rolename,jdbcType=VARCHAR}, #{card_id,jdbcType=VARCHAR}, ",
        "#{company_id,jdbcType=VARCHAR})"
    })
    int insert(UserEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @InsertProvider(type=UserEntitySqlProvider.class, method="insertSelective")
    int insertSelective(UserEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @SelectProvider(type=UserEntitySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="nickname", property="nickname", jdbcType=JdbcType.VARCHAR),
        @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR),
        @Result(column="headimgurl", property="headimgurl", jdbcType=JdbcType.VARCHAR),
        @Result(column="unionid", property="unionid", jdbcType=JdbcType.VARCHAR),
        @Result(column="ts", property="ts", jdbcType=JdbcType.VARCHAR),
        @Result(column="last_login_time", property="last_login_time", jdbcType=JdbcType.VARCHAR),
        @Result(column="phone_login", property="phone_login", jdbcType=JdbcType.INTEGER),
        @Result(column="login", property="login", jdbcType=JdbcType.INTEGER),
        @Result(column="reg_time", property="reg_time", jdbcType=JdbcType.CHAR),
        @Result(column="username", property="username", jdbcType=JdbcType.VARCHAR),
        @Result(column="pwd", property="pwd", jdbcType=JdbcType.VARCHAR),
        @Result(column="usertype", property="usertype", jdbcType=JdbcType.VARCHAR),
        @Result(column="dr", property="dr", jdbcType=JdbcType.INTEGER),
        @Result(column="sex", property="sex", jdbcType=JdbcType.INTEGER),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR),
        @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
        @Result(column="birthday", property="birthday", jdbcType=JdbcType.VARCHAR),
        @Result(column="openid", property="openid", jdbcType=JdbcType.VARCHAR),
        @Result(column="country", property="country", jdbcType=JdbcType.VARCHAR),
        @Result(column="nation", property="nation", jdbcType=JdbcType.VARCHAR),
        @Result(column="userstate", property="userstate", jdbcType=JdbcType.INTEGER),
        @Result(column="userclass", property="userclass", jdbcType=JdbcType.INTEGER),
        @Result(column="accountmny", property="accountmny", jdbcType=JdbcType.DECIMAL),
        @Result(column="createuser", property="createuser", jdbcType=JdbcType.VARCHAR),
        @Result(column="safepwd", property="safepwd", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="areaid", property="areaid", jdbcType=JdbcType.VARCHAR),
        @Result(column="company", property="company", jdbcType=JdbcType.VARCHAR),
        @Result(column="department", property="department", jdbcType=JdbcType.VARCHAR),
        @Result(column="job_title", property="job_title", jdbcType=JdbcType.VARCHAR),
        @Result(column="area", property="area", jdbcType=JdbcType.VARCHAR),
        @Result(column="rolename", property="rolename", jdbcType=JdbcType.VARCHAR),
        @Result(column="card_id", property="card_id", jdbcType=JdbcType.VARCHAR),
        @Result(column="company_id", property="company_id", jdbcType=JdbcType.VARCHAR)
    })
    List<UserEntity> selectByExample(UserEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @Select({
        "select",
        "id, nickname, city, headimgurl, unionid, ts, last_login_time, phone_login, login, ",
        "reg_time, username, pwd, usertype, dr, sex, mobile, telephone, email, birthday, ",
        "openid, country, nation, userstate, userclass, accountmny, createuser, safepwd, ",
        "address, areaid, company, department, job_title, area, rolename, card_id, company_id",
        "from zydzn_users",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="nickname", property="nickname", jdbcType=JdbcType.VARCHAR),
        @Result(column="city", property="city", jdbcType=JdbcType.VARCHAR),
        @Result(column="headimgurl", property="headimgurl", jdbcType=JdbcType.VARCHAR),
        @Result(column="unionid", property="unionid", jdbcType=JdbcType.VARCHAR),
        @Result(column="ts", property="ts", jdbcType=JdbcType.VARCHAR),
        @Result(column="last_login_time", property="last_login_time", jdbcType=JdbcType.VARCHAR),
        @Result(column="phone_login", property="phone_login", jdbcType=JdbcType.INTEGER),
        @Result(column="login", property="login", jdbcType=JdbcType.INTEGER),
        @Result(column="reg_time", property="reg_time", jdbcType=JdbcType.CHAR),
        @Result(column="username", property="username", jdbcType=JdbcType.VARCHAR),
        @Result(column="pwd", property="pwd", jdbcType=JdbcType.VARCHAR),
        @Result(column="usertype", property="usertype", jdbcType=JdbcType.VARCHAR),
        @Result(column="dr", property="dr", jdbcType=JdbcType.INTEGER),
        @Result(column="sex", property="sex", jdbcType=JdbcType.INTEGER),
        @Result(column="mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR),
        @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR),
        @Result(column="birthday", property="birthday", jdbcType=JdbcType.VARCHAR),
        @Result(column="openid", property="openid", jdbcType=JdbcType.VARCHAR),
        @Result(column="country", property="country", jdbcType=JdbcType.VARCHAR),
        @Result(column="nation", property="nation", jdbcType=JdbcType.VARCHAR),
        @Result(column="userstate", property="userstate", jdbcType=JdbcType.INTEGER),
        @Result(column="userclass", property="userclass", jdbcType=JdbcType.INTEGER),
        @Result(column="accountmny", property="accountmny", jdbcType=JdbcType.DECIMAL),
        @Result(column="createuser", property="createuser", jdbcType=JdbcType.VARCHAR),
        @Result(column="safepwd", property="safepwd", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="areaid", property="areaid", jdbcType=JdbcType.VARCHAR),
        @Result(column="company", property="company", jdbcType=JdbcType.VARCHAR),
        @Result(column="department", property="department", jdbcType=JdbcType.VARCHAR),
        @Result(column="job_title", property="job_title", jdbcType=JdbcType.VARCHAR),
        @Result(column="area", property="area", jdbcType=JdbcType.VARCHAR),
        @Result(column="rolename", property="rolename", jdbcType=JdbcType.VARCHAR),
        @Result(column="card_id", property="card_id", jdbcType=JdbcType.VARCHAR),
        @Result(column="company_id", property="company_id", jdbcType=JdbcType.VARCHAR)
    })
    UserEntity selectByPrimaryKey(UserEntityKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @UpdateProvider(type=UserEntitySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") UserEntity record, @Param("example") UserEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @UpdateProvider(type=UserEntitySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") UserEntity record, @Param("example") UserEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @UpdateProvider(type=UserEntitySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(UserEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_users
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @Update({
        "update zydzn_users",
        "set nickname = #{nickname,jdbcType=VARCHAR},",
          "city = #{city,jdbcType=VARCHAR},",
          "headimgurl = #{headimgurl,jdbcType=VARCHAR},",
          "unionid = #{unionid,jdbcType=VARCHAR},",
          "ts = #{ts,jdbcType=VARCHAR},",
          "last_login_time = #{last_login_time,jdbcType=VARCHAR},",
          "phone_login = #{phone_login,jdbcType=INTEGER},",
          "login = #{login,jdbcType=INTEGER},",
          "reg_time = #{reg_time,jdbcType=CHAR},",
          "username = #{username,jdbcType=VARCHAR},",
          "pwd = #{pwd,jdbcType=VARCHAR},",
          "usertype = #{usertype,jdbcType=VARCHAR},",
          "dr = #{dr,jdbcType=INTEGER},",
          "sex = #{sex,jdbcType=INTEGER},",
          "mobile = #{mobile,jdbcType=VARCHAR},",
          "telephone = #{telephone,jdbcType=VARCHAR},",
          "email = #{email,jdbcType=VARCHAR},",
          "birthday = #{birthday,jdbcType=VARCHAR},",
          "openid = #{openid,jdbcType=VARCHAR},",
          "country = #{country,jdbcType=VARCHAR},",
          "nation = #{nation,jdbcType=VARCHAR},",
          "userstate = #{userstate,jdbcType=INTEGER},",
          "userclass = #{userclass,jdbcType=INTEGER},",
          "accountmny = #{accountmny,jdbcType=DECIMAL},",
          "createuser = #{createuser,jdbcType=VARCHAR},",
          "safepwd = #{safepwd,jdbcType=VARCHAR},",
          "address = #{address,jdbcType=VARCHAR},",
          "areaid = #{areaid,jdbcType=VARCHAR},",
          "company = #{company,jdbcType=VARCHAR},",
          "department = #{department,jdbcType=VARCHAR},",
          "job_title = #{job_title,jdbcType=VARCHAR},",
          "area = #{area,jdbcType=VARCHAR},",
          "rolename = #{rolename,jdbcType=VARCHAR},",
          "card_id = #{card_id,jdbcType=VARCHAR},",
          "company_id = #{company_id,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(UserEntity record);
}